package com.umpay.provdcs.busi.impl;

import com.umpay.provdcs.busi.IBusiHandler;
import com.umpay.provdcs.busi.IDataProcess;
import com.umpay.provdcs.server.WrapMessage;

public class DataProcess implements IDataProcess {

    private Object data;

    public void onData(Object o) throws Exception {
        // through class loader
        IBusiHandler IBusiHandler = new SaveFileDataHandlerImpl();
        IBusiHandler.doService((WrapMessage) o);
    }

    public void run() {
        try {
            onData(data);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
